package example;

import com.ikaven.demo.axis.client.SayhiServiceServiceLocator;
import com.ikaven.demo.axis.client.SayhiService_PortType;

import java.rmi.activation.Activator;

public class SayhiClient {
  public static void main(String[] argv) {
      try {
          SayhiServiceServiceLocator locator = new SayhiServiceServiceLocator();
          SayhiService_PortType service = locator.getSayhiService();
          // If authorization is required
          //((SayhiServiceSoapBindingStub)service).setUsername("user3");
          //((SayhiServiceSoapBindingStub)service).setPassword("pass3");
          // invoke business method
          service.sayhi("kaven");
      } catch (javax.xml.rpc.ServiceException ex) {
          ex.printStackTrace();
      } catch (java.rmi.RemoteException ex) {
          ex.printStackTrace();
      }
  }
}
